#ifndef __JB_NANOSIC__H__
#define __JB_NANOSIC__H__

#ifdef __cplusplus
extern "C" { 
#endif

typedef enum{
EVT_KEYCODE,
EVT_VOICE,
EVT_UNKOWN,
}EM_EVT_TYPE;

typedef struct{
	int keycode;
}ST_Key;

typedef struct{
	char* buf;
	int   length;
}ST_Voice;

typedef struct{
	EM_EVT_TYPE type;
	union{
		ST_Key      Key;
		ST_Voice    Voice;
	}u;
}ST_Event;

/*-----------------------------------------------------------------------------
Function Name:	Nano_Open
Input		:	
Output		:	
Return 		:	0		成功
				其它   失败
Describe		:	lib 初始化
-------------------------------------------------------------------------------*/
int Nano_Open(void);

/*-----------------------------------------------------------------------------
Function Name:	Nano_BeginPollProcessing
Input		:


Output		:
Return 		:
Describe		:	收取事件
-------------------------------------------------------------------------------*/
ST_Event* Nano_BeginPollProcessing(void);

/*-----------------------------------------------------------------------------
Function Name:	Nano_EndPollProcessing
Input		:


Output		:
Return 		:
Describe		:	销毁事件
-------------------------------------------------------------------------------*/
void Nano_EndPollProcessing(ST_Event* Evt);

/*-----------------------------------------------------------------------------
Function Name:	Nano_Connected
Input			:

Output		:
Return 		:	1 : 设备已连接，0:无设备连接
Describe		:	
-------------------------------------------------------------------------------*/
int Nano_Connected(void);

#ifdef __cplusplus
}
#endif


#endif
